rememberBrowserViewState

@Composable
fun WindowScope.rememberBrowserViewState(browser: Browser, scope: CoroutineScope = rememberCoroutineScope(), dragAndDropOptions: DragAndDropOptions = DragAndDropOptions()): BrowserViewState
@Composable
fun WindowScope.rememberBrowserViewState(browser: Browser, scope: CoroutineScope = rememberCoroutineScope(), dragAndDropOptions: DragAndDropOptions = DragAndDropOptions()): BrowserViewState

Creates a BrowserViewState that is remembered across compositions.

Passing a different browser instance will result in the state being closed and recreated. The state will also be automatically closed when rememberBrowserViewState leaves the composition.

It needs a WindowScope to access the native AWT window. This access enables the BrowserViewState to utilize native AWT capabilities, such as handling specific window events and accessing window properties.

Since

8.0.0

Parameters

browser

The browser, whose content is to be displayed.

scope

The coroutine scope used for updating Compose observables.

dragAndDropOptions

The configuration options for the drag-and-drop functionality.